package com.hsq.ndmall.wx.feign.order;

import com.hsq.ndmall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(value = "promotion-service")
public interface PromotionFeign {

    @GetMapping("promotion/grouponrules/info/{id}")
    R grouponInfo(@PathVariable("id") Integer id);

    @GetMapping("promotion/couponuser/list")
    R couponUserList(@RequestParam Map<String, Object> params);

    @GetMapping("promotion/coupon/info/{id}")
    R couponInfo(@PathVariable("id") Integer id);

    @GetMapping("promotion/couponuser/info/{id}")
    R couponUserInfo(@PathVariable("id") Integer id);

    @PutMapping("promotion/couponuser/update")
    void update(@RequestBody Map coupon);
}
